package followme.yaohuile.com.followme.network.recommend.destination;

import android.util.Log;

import com.lidroid.xutils.exception.HttpException;
import com.lidroid.xutils.http.ResponseInfo;
import com.lidroid.xutils.http.callback.RequestCallBack;

import followme.yaohuile.com.followme.interfaceinfo.destination.GetCityInfo;
import followme.yaohuile.com.followme.interfaceinfo.destination.GetInfo;
import followme.yaohuile.com.followme.network.recommend.NetWork;

/**
 * Created by Administrator on 15-11-13.
 */
public class DestinationData {
    public static void getData(String url, final GetInfo getInfo) {

        NetWork.getDataWork(url, new RequestCallBack<String>() {
            @Override
            public void onSuccess(ResponseInfo<String> responseInfo) {
                getInfo.sendInfo(responseInfo.result);
            }

            @Override
            public void onFailure(HttpException e, String s) {
                Log.d("main", "zheshicuole");
            }
        });


    }

    public static void getCityData(String url, final GetCityInfo cityInfo) {
        NetWork.getCityInfo(url, new RequestCallBack<String>() {
            @Override
            public void onSuccess(ResponseInfo<String> responseInfo) {

                cityInfo.CityInfo(responseInfo.result);
            }

            @Override
            public void onFailure(HttpException e, String s) {

            }
        });
    }


    public static void getHotCotyData(String url, final GetCityInfo cityInfo) {
        NetWork.getCityInfo(url, new RequestCallBack<String>() {
            @Override
            public void onSuccess(ResponseInfo<String> responseInfo) {
                cityInfo.CityInfo(responseInfo.result);
            }

            @Override
            public void onFailure(HttpException e, String s) {

            }
        });
    }


}
